package com.ruoyi.training.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.training.mapper.TariningTeacherResourceMonitorMapper;
import com.ruoyi.training.domain.TariningTeacherResourceMonitor;
import com.ruoyi.training.service.ITariningTeacherResourceMonitorService;

/**
 * 教师资源监控Service业务层处理
 * 
 * @author rocc
 * @date 2025-06-12
 */
@Service
public class TariningTeacherResourceMonitorServiceImpl implements ITariningTeacherResourceMonitorService 
{
    @Autowired
    private TariningTeacherResourceMonitorMapper tariningTeacherResourceMonitorMapper;

    /**
     * 查询教师资源监控
     * 
     * @param id 教师资源监控主键
     * @return 教师资源监控
     */
    @Override
    public TariningTeacherResourceMonitor selectTariningTeacherResourceMonitorById(Long id)
    {
        return tariningTeacherResourceMonitorMapper.selectTariningTeacherResourceMonitorById(id);
    }

    /**
     * 查询教师资源监控列表
     * 
     * @param tariningTeacherResourceMonitor 教师资源监控
     * @return 教师资源监控
     */
    @Override
    public List<TariningTeacherResourceMonitor> selectTariningTeacherResourceMonitorList(TariningTeacherResourceMonitor tariningTeacherResourceMonitor)
    {
        return tariningTeacherResourceMonitorMapper.selectTariningTeacherResourceMonitorList(tariningTeacherResourceMonitor);
    }

    /**
     * 新增教师资源监控
     * 
     * @param tariningTeacherResourceMonitor 教师资源监控
     * @return 结果
     */
    @Override
    public int insertTariningTeacherResourceMonitor(TariningTeacherResourceMonitor tariningTeacherResourceMonitor)
    {
        tariningTeacherResourceMonitor.setCreateTime(DateUtils.getNowDate());
        return tariningTeacherResourceMonitorMapper.insertTariningTeacherResourceMonitor(tariningTeacherResourceMonitor);
    }

    /**
     * 修改教师资源监控
     * 
     * @param tariningTeacherResourceMonitor 教师资源监控
     * @return 结果
     */
    @Override
    public int updateTariningTeacherResourceMonitor(TariningTeacherResourceMonitor tariningTeacherResourceMonitor)
    {
        tariningTeacherResourceMonitor.setUpdateTime(DateUtils.getNowDate());
        return tariningTeacherResourceMonitorMapper.updateTariningTeacherResourceMonitor(tariningTeacherResourceMonitor);
    }

    /**
     * 批量删除教师资源监控
     * 
     * @param ids 需要删除的教师资源监控主键
     * @return 结果
     */
    @Override
    public int deleteTariningTeacherResourceMonitorByIds(Long[] ids)
    {
        return tariningTeacherResourceMonitorMapper.deleteTariningTeacherResourceMonitorByIds(ids);
    }

    /**
     * 删除教师资源监控信息
     * 
     * @param id 教师资源监控主键
     * @return 结果
     */
    @Override
    public int deleteTariningTeacherResourceMonitorById(Long id)
    {
        return tariningTeacherResourceMonitorMapper.deleteTariningTeacherResourceMonitorById(id);
    }
}
